<?php
namespace app\shop\controller\order;

use app\shop\controller\Controller;
use app\common\model\order\RechargeOrder as RechargeOrderModel;

/**
 * 充值订单控制器
 */
class RechargeOrder extends Controller
{
    /*
     * 列表
     * */
    public function index()
    {
        $data = $this->request->param('Params');
        $model =new RechargeOrderModel;
        $list = $model->get_list_admin($data);

        return $this->renderSuccess('',compact('list'));
    }

    /*
     * 查看详情
     * */
    public function details()
    {
        $id = $this->request->param('id');
        $model =new RechargeOrderModel;
        $info = $model->details($id);
        return $this->renderSuccess('',compact('info'));
    }

    public function editPost()
    {
        $data = $this->request->param();
        $model =new RechargeOrderModel;

    }

    public function del_order()
    {
        $id = $this->request->param('id');
        $model =new RechargeOrderModel;
        $res = $model->where(array('id'=>$id))->update(array('is_delete'=>1));
        if($res){
            return $this->renderSuccess('删除成功');
        }else{
            return $this->renderError('删除失败');
        }
    }
}